import {createRouter, createWebHashHistory} from "vue-router"
import Routes from './routes'
import Store from '@/store'

const router = createRouter({
	history: createWebHashHistory(),
	routes: Routes
})
router.beforeEach((to, from, next) => {
	Store.commit('clearAxiosPromiseCancelArr') // 路由跳转前取消全部请求
	next()
})

export default router
